//---------------------------------------------------------------------------

#ifndef f_ArvoreBinariaH
#define f_ArvoreBinariaH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include "classeArvoreBinaria.h"
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>
#include <vector>
using namespace std;
//---------------------------------------------------------------------------
class TfrmArvoreBinaria : public TForm
{
__published:	// IDE-managed Components
	TPanel *Panel1;
	TButton *btnInserir;
	TEdit *edtValor;
	TButton *btnRemover;
	TPanel *pnlCanvas;
	TImage *imgCanvasArvore;
	TEdit *edtOrdenado;
	TTrackBar *faixaDistorcao;
	TButton *btnLimpar;
	TButton *btnAleatorio;
	void __fastcall btnInserirClick(TObject *Sender);
	void __fastcall edtValorKeyPress(TObject *Sender, char &Key);
	void __fastcall btnRemoverClick(TObject *Sender);
	void __fastcall faixaDistorcaoChange(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall btnLimparClick(TObject *Sender);
	void __fastcall btnAleatorioClick(TObject *Sender);
private:	// User declarations
	ArvoreBinaria * edArvoreBinaria;
	vector<int> * vetorOrdenado;
	void atualiza();
public:		// User declarations
	__fastcall TfrmArvoreBinaria(TComponent* Owner, ArvoreBinaria *);
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmArvoreBinaria *frmArvoreBinaria;
//---------------------------------------------------------------------------
#endif
